/**
 * 
 */
package edu.unc.comp410.colemangeer.data;

import java.util.HashMap;
import java.util.Map;


/**
 * @author ccoleman
 *
 */
public class ConstraintGatewayEmulator implements IConstraintGateway {

	//Map with constraintresult values , constraint names as keys
	
	private final Map<String,IntegerConstraintGatewayResult> constraintNameMap;// = new HashMap<String,IntegerConstraintGatewayResult>();
	
	public ConstraintGatewayEmulator(){
		constraintNameMap = new HashMap<String,IntegerConstraintGatewayResult>();
		initConstraintMap();
	}
	
	private void initConstraintMap(){
		constraintNameMap.put("Customer ID", new IntegerConstraintGatewayResult(0,999999));
		constraintNameMap.put("AreaCode", new IntegerConstraintGatewayResult(202,989));
		constraintNameMap.put("ZipCode_integer", new IntegerConstraintGatewayResult(501,99929));
	}
	
	/* (non-Javadoc)
	 * @see edu.unc.comp410.colemangeer.IConstraintGateway#successfulDBconnection()
	 */
	@Override
	public boolean successfulDBconnection() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public IntegerConstraintGatewayResult findIntegerConstraint(String constraintName){
		System.out.println("ConstraintGatewayEmulator.findIntegerConstraint(" + constraintName + ")...");
		return constraintNameMap.get(constraintName);
	}
}
